home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
mebbs
/
logtossv101.lha
/
logtoss.rexx
< prev
next >
Wrap
OS/2 REXX Batch file
|
1995-02-22
|
3KB
|
112 lines
/*Yet another Spiffy Arexx Program from the one and only "Joe Clayton" */
option results
aa=0
call open(f1,'mebbsnet:configfiles/logtoss.cfg','r')
do until aa=11
aa=aa+1
d1.aa=upper(readln(f1))
end
call close(f1)
address command'list 'd1.5'#?.log lformat %s >ram:logtoss.tmp'
call open(loglist,'ram:logtoss.tmp','r')
ab=0
do while eof(loglist)='0'
ab=ab+1
FILE.ab=readln(loglist)
if file.ab~='' then do
call output
address command'move 'd1.5||FILE.ab' TO 'd1.6||d2.1'_'d2.2'_'d2.3'_'d2.4''
end
end
call close(loglist)
address command"delete ram:logtoss.tmp"
call inse
call open(t1,"mebbsnet:Call.log",'w')
call close(t1)
call open(t1,"mebbsnet:Upload.log",'w')
call close(t1)
call open(t1,"mebbsnet:DownLoad.log",'w')
call close(t1)
exit 0
Output:
if d1.1='YEAR' then do
d2.1=left(date(s),4);VAR.1='YDAT';end
if d1.1='MONTH' then do
d2.1=left(date(u),2);VAR.1='MDAT';end
if d1.1='DAY' then do
d2.1=right(date(s),2);VAR.1='DDAT';end
if d1.1='FILE' then do
d2.1=FILE.ab;VAR.1='FDAT';end
if d1.2='YEAR' then do
d2.2=left(date(s),4);VAR.2='YDAT';end
if d1.2='MONTH' then do
d2.2=left(date(u),2);VAR.2='MDAT';end
if d1.2='DAY' then do
d2.2=right(date(s),2);VAR.2='DDAT';end
if d1.2='FILE' then do
d2.2=FILE.ab;VAR.2='FDAT';end
if d1.3='YEAR' then do
d2.3=left(date(s),4);VAR.3='YDAT';end
if d1.3='MONTH' then do
d2.3=left(date(u),2);VAR.3='MDAT';end
if d1.3='DAY' then do
d2.3=right(date(s),2);VAR.3='DDAT';end
if d1.3='FILE' then do
d2.3=FILE.ab;VAR.3='FDAT';end
if d1.4='YEAR' then do
d2.4=left(date(s),4);VAR.4='YDAT';end
if d1.4='MONTH' then do
d2.4=left(date(u),2);VAR.4='MDAT';end
if d1.4='DAY' then do
d2.4=right(date(s),2);VAR.4='DDAT';end
if d1.4='FILE' then do
d2.4=FILE.ab;VAR.4='FDAT';end
return
inse:
if datatype(d1.11,"w")="1" then call killlog
return
KillLog:
address command'list 'd1.6'#?_#? lformat %s >ram:logtoss.tmp'
call open(kill,'ram:logtoss.tmp','r')
ac=0
do while eof(kill)='0'
ac=ac+1
data.ac=readln(kill)
if data.ac~='' then do
parse var data.ac var1'_'var2'_'var3'_'var4
call killout
end
end
call close(kill)
address command"Delete ram:logtoss.tmp"
return
killout:
ad=0
if var.1='YDAT' then DAT1=var1*0
if var.1='MDAT' then DAT1=var1*30
if var.1='DDAT' then DAT1=var1
if var.1='FDAT' then DAT1=var1
if var.2='YDAT' then DAT2=var2*0
if var.2='MDAT' then DAT2=var2*30
if var.2='DDAT' then DAT2=var2
if var.2='FDAT' then DAT2=var2
if var.3='YDAT' then DAT3=var3*0
if var.3='MDAT' then DAT3=var3*30
if var.3='DDAT' then DAT3=var3
if var.3='FDAT' then DAT3=var3
if var.4='YDAT' then DAT4=var4*0
if var.4='MDAT' then DAT4=var4*30
if var.4='DDAT' then DAT4=var4
if var.4='FDAT' then DAT4=var4
if datatype(dat1,'w')='1' then ad=ad+dat1
if datatype(dat2,'w')='1' then ad=ad+dat2
if datatype(dat3,'w')='1' then ad=ad+dat3
if datatype(dat4,'w')='1' then ad=ad+dat4
mx=left(date(u),2)*30
nx=right(date(s),2)
datest=nx+mx
if ad+d1.11<datest then do
address command"Delete "d1.6||data.ac
end
return